package cn.kgc.tangcco.pojo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author 李昊哲
 * @Description
 * @create 2020/12/29 14:22
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@DynamicInsert
@DynamicUpdate
@Table(name = "idiom")
@Entity
public class Idiom implements Serializable {
    private static final long serialVersionUID = 7553935244407585482L;
    /**
     * 主键ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;
    /**
     * 成语
     */
    @Column(name = "name")
    private String name;
    /**
     * 拼音
     */
    @Column(name = "spell")
    private String spell;
    /**
     * 解释
     */
    @Column(name = "content")
    private String content;
    /**
     * 典故
     */
    @Column(name = "derivation")
    private String derivation;
    /**
     * 举例句子
     */
    @Column(name = "samples")
    private String samples;
}
